/**
*@author       wuwg
*@createTime   2018/03/20
*@updateTime   2018/03/20
*@description
*@rule
 */
@import '../../../config/config.less';
@import '../../../mixins/input/input-mixins.less';

@page-prefix-cls: ~"@{css-prefix}pagination";

.@{page-prefix-cls} {
  &:after {
    content: '';
    display: block;
    height: 0;
    clear: both;
    overflow: hidden;
    visibility: hidden;
  }

  &-item {
    display: inline-block;
    //float: left;
    vertical-align: middle;
    min-width: @btn-circle-size;
    height: @btn-circle-size;
    line-height: @btn-circle-size - 2px;
    margin-right: 4px;
    text-align: center;
    list-style: none;
    background-color: #fff;
    user-select: none;
    cursor: pointer;
    font-family: Arial;
    border: 1px solid @border-color-base;
    border-radius: @pagination-border-radius;
    //transition: all @transition-time @ease-in-out;
    transition: border @transition-time @ease-in-out, color @transition-time @ease-in-out;

    a {
      margin: 0 6px;
      text-decoration: none;
      color: @text-color;
      //transition: none;
    }

    &:hover {
      border-color: @primary-color;
      a {
        color: @primary-color;
      }
    }

    &-active {
      background-color: @primary-color;
      border-color: @primary-color;

      a, &:hover a {
        color: #fff;
      }
    }
  }

  &-item-jump-prev,
  &-item-jump-next {
    &:after {
      content: "•••";
      display: block;
      letter-spacing: 1px;
      color: #ccc;
      text-align: center;
    }

    i{
      display: none;
    }

    &:hover {
      &:after{
        color: @primary-color;
      }
    }
  }
  ////
  //&-item-jump-prev:hover {
  //  i:after {
  //    content: "\F3D2";
  //  }
  //}
  ////
  //&-item-jump-next:hover {
  //  i:after {
  //    content: "\F3D3";
  //  }
  //}

  &-prev{
    margin-right: 8px;
  }

  &-item-jump-prev,
  &-item-jump-next{
    margin-right: 4px;
  }

  &-next{
    margin-left: 4px;
  }

  // 前按钮，后按钮
  &-prev,
  &-next,
  &-item-jump-prev,
  &-item-jump-next {
    display: inline-block;
    vertical-align: middle;
    //float: left;
    min-width: @btn-circle-size;
    height: @btn-circle-size;
    line-height: @btn-circle-size - 2px;
    list-style: none;
    text-align: center;
    cursor: pointer;
    color: #666;
    font-family: Arial;
    border: 1px solid @border-color-base;
    border-radius: @pagination-border-radius;
    transition: all @transition-time @ease-in-out;
  }

  // 前按钮，后按钮
  &-prev,
  &-next {
    background-color: #fff;
    a {
      color: #666;
      font-size: 14px;
    }

    &:hover {
      border-color: @primary-color;

      a {
        color: @primary-color;
      }
    }
  }
  // 禁用
  &-disabled {
    cursor: @cursor-disabled;
    a {
      color: #ccc;
    }
    &:hover {
      border-color: @border-color-base;
      a {
        color: #ccc;
        cursor: @cursor-disabled;
      }
    }
  }

  // 总数
  &-total {
    display: inline-block;
    //float: left;
    height: @btn-circle-size;
    line-height: @btn-circle-size;
    margin-right: 10px;
  }


  // 简洁型 前按钮，后按钮
  &-simple &-prev,
  &-simple &-next {
    margin: 0;
    border: 0;
    height: 24px;
    line-height: 24px;
    font-size: 18px;
  }

  // 简洁型
  &-simple &-simple-pager {
    display: inline-block;
    //float: left;
    margin-right: 8px;

    input {
      width: 50px;
      height: 24px;
      margin: 0 8px;
      padding: 5px 8px;
      text-align: center;
      box-sizing: border-box;
      background-color: #fff;
      outline: none;
      border: 1px solid @border-color-base;
      border-radius: @btn-border-radius;
      transition: border-color @transition-time @ease-in-out;

      &:hover {
        border-color: @primary-color;
      }
    }

    span{
      padding: 0 8px 0 2px;
    }
  }

  // 导出数据按钮
  &-export {
      display: inline-block;
      margin-left:15px;
  }
}


.@{page-prefix-cls} {
  &.mini &-total {
    height: @btn-circle-size-small;
    line-height: @btn-circle-size-small;
  }

  &.mini &-item {
    border: 0;
    margin: 0;
    min-width: @btn-circle-size-small;
    height: @btn-circle-size-small;
    line-height: @btn-circle-size-small;
    border-radius: @pagination-border-radius-small;
  }

  &.mini &-prev,
  &.mini &-next {
    margin: 0;
    min-width: @btn-circle-size-small;
    height: @btn-circle-size-small;
    line-height: @btn-circle-size-small;
    border: 0;

    a {
      i:after {
        height: @btn-circle-size-small;
        line-height: @btn-circle-size-small;
      }
    }
  }

  &.mini &-item-jump-prev,
  &.mini &-item-jump-next {
    height: @btn-circle-size-small;
    line-height: @btn-circle-size-small;
    border: none;
    margin-right: 0;
  }

  &.mini &-simple-pager {
    input {
      .input-small();
       width: 44px;
    }
  }
}
